IF (CMAKE_HOST_WIN32)

	SET(LIBTS_DIR ${THIRD_PARTY}/windows/x86/libts)
	IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
		SET(LIBTS_DIR ${THIRD_PARTY}/windows/x64/libts)
	ENDIF()

	SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
	SET(LIBTS_LIB_DIR  ${LIBTS_DIR}/lib)
  SET(LIBTS_LIBS ${LIBTS_LIB_DIR}/ts.lib)

ELSE()

	IF(CMAKE_TOOLCHAIN_FILE)
		IF (CMAKE_SYSTEM_NAME STREQUAL Android)

			IF (ANDROID_ABI STREQUAL armeabi-v7a)
				SET(LIBTS_DIR ${THIRD_PARTY}/android/libts/armeabi-v7a)
			ELSEIF (ANDROID_ABI STREQUAL arm64-v8a)
				SET(LIBTS_DIR ${THIRD_PARTY}/android/libts/arm64-v8a)
			ENDIF()

			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv300")
			SET(LIBTS_DIR ${THIRD_PARTY}/hisiv300/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv400")
			SET(LIBTS_DIR ${THIRD_PARTY}/hisiv400/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv500")
			SET(LIBTS_DIR ${THIRD_PARTY}/hisiv500/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv600")
			SET(LIBTS_DIR ${THIRD_PARTY}/hisiv600/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "himix100")
			SET(LIBTS_DIR ${THIRD_PARTY}/himix100/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ELSEIF (CMAKE_C_COMPILER MATCHES "himix200")
			SET(LIBTS_DIR ${THIRD_PARTY}/himix200/libts)
			SET(LIBTS_INCLUDE_DIR ${LIBTS_DIR}/include)
			SET(LIBTS_LIB_DIR ${LIBTS_DIR}/lib)
		ENDIF()
	ELSE()
		FIND_PATH(LIBTS_INCLUDE_DIR NAMES mpeg-ts.h PATHS ${THIRD_PARTY}/gcc/libts/include)
		FIND_PATH(LIBTS_LIB_DIR NAMES libts.a PATHS ${THIRD_PARTY}/gcc/libts/lib)
	ENDIF()	

    SET(LIBTS_LIBS ${LIBTS_LIB_DIR}/libts.a)
ENDIF()
